/*
	The directives starting with # below ensures that this file is read by the compiler only once
	even if it is #included several times. It is call an "include guard"
*/
#ifndef ORDER_H_
#define ORDER_H_

//other types
#include "Chrono.h"					
#include <string>
#include <sstream>
using namespace std;
using namespace Chrono;

struct Order {
public:
	//data

	// constructors
	Order () {}
	Order(int oid, int sid, int tid, Date od, Time ot):
	order_id(oid), server_id(sid), table_id(tid), order_date(od), order_time(ot) {}
   // utility functions
	//SBH B.2
	string display() const {	
		ostringstream oss;
		oss <<"Order ID: "<< order_id << "\n "<<"\t Server ID:"  << server_id << "\n "<<"\t Table ID:"  << table_id << "\n "<<"\t Order Date:"  << order_date << "\n "<<"\t Order Time:"  << order_time<< "\n "<< "\n ";
		return oss.str();
	}
	int get_table_id() const {return table_id;}	//B.2.a
	int get_order_id() const {return order_id;}	//B.2.a
	int get_server_id() {return server_id;}         
	Date get_date() {return order_date;}         
	Time get_time() {return order_time;}         
	int get_year() {return order_date.get_year();}          
	int get_month() {return order_date.get_month();}         
	int get_day() {return order_date.get_day();}         
	int get_hour() {return order_time.get_hour();}          
	int get_min() {return order_time.get_minute();}  
private:
   //constants

   // private data
	int order_id;
	int server_id;
	int table_id;
	Date order_date;
	Time order_time;
};


#endif //ORDER_H_
